<?php
session_start();

/*
 * Script que processa os posts de jQuery para o convite de novos utilizadores para um projeto
 */

require_once '../../../serverResources/includes/db/ConnDBUser.php';
require_once '../../../serverResources/includes/classes/Affiliation.php';
require_once '../../../serverResources/includes/classes/class.phpmailer.php';
require_once '../../../serverResources/includes/classes/class.smtp.php';

if(isset($_POST['email']) && isset($_POST['perfil'])){

	$aff=new Affiliation($_POST['email'], $_POST['perfil'], $_SESSION['projectID']);
	$success=$aff->inviteMember();
	unset($aff);
	echo $success;

}